
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel=stylesheet href='include/hoj.css' type='text/css'>
</head>
<body>
<center>
<div style="width:90%; text-align:left">
<img src="image/logo.png"/>
</div>
<table width=96%> 
	<tr align="center" class='hd' valign="top">
				<th><a href="faqs.php">F.A.Qs</a></th>
		<th><a href="./bbs.php">Web Board</a></th>
		<th><a href="./">Home</a></th>
		<th><a href="./problemset.html">ProblemSet</a></th>
		<th><a href="./status.php">Status</a></th>
		<th><a href="./ranklist.php">Ranklist</a></th>
		<th><a href="./contest.php">Contest</a></th>
		<th><a href=loginpage.php>Login</a></th><th><a href=registerpage.php>Register</a></th>	</tr>
</table>
</center>
<center>
<div class="notice">
	<div>
		<B>Notice:</B>鉴于种种原因，本OJ自下周星期一（3月5号）开始不再全面开放，请各位做好善后事宜，谢谢合作。	</div>
</div>
</center>
</div>
<title>Problem 2502. -- 清理雪道 -- 衡阳八中OJ离线版-2012-02-29</title><center><h2>2502: 清理雪道</h2><span class=green>Time Limit: </span>10 Sec&nbsp;&nbsp;<span class=green>Memory Limit: </span>128 MB<br><span class=green>Submit: </span>46&nbsp;&nbsp;<span class=green>Solved: </span>20<br>[<a href='submitpage.php?id=2502'>Submit</a>][<a href='problemstatus.php?id=2502'>Status</a>][<a href='bbs.php?id=2502'>Discuss</a>]</center><h2>Description</h2><div class=content><div><span style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-size: 12pt">滑雪场坐落在</span><span style="font-size: 12pt">FJ</span><span style="font-size: 12pt">省西北部的若干座山上。</span></div>
<div style="text-indent: 21pt"><span style="font-size: 12pt">从空中鸟瞰，滑雪场可以看作一个有向无环图，每条弧代表一个斜坡<span style="color: red">（即雪道）</span>，弧的方向代表斜坡下降的方向。</span></div>
<div style="text-indent: 21pt"><span style="font-size: 12pt">你的团队负责每周定时清理雪道。你们拥有一架直升飞机，每次飞行可以从总部带一个人降落到滑雪场的某个地点，然后再飞回总部。从降落的地点出发，这个人可以顺着斜坡向下滑行，并清理他所经过的雪道。</span></div>
<div style="text-indent: 21pt"><span style="font-size: 12pt">由于每次飞行的耗费是固定的，为了最小化耗费，你想知道如何用最少的飞行次数才能完成清理雪道的任务。</span></div>
<div style="text-indent: 21pt">
<div style="margin: 13pt 0cm; line-height: normal"></div>
</div></div><h2>Input</h2><div class=content><div style="text-indent: 21pt">
<div style="margin: 13pt 0cm; line-height: normal"></div>
<span style="font-size: 12pt">输入文件的第一行包含一个整数</span><i><span style="font-size: 12pt">n</span></i><span style="font-size: 12pt"> (2 &lt;= <i>n</i> &lt;= 100) &ndash; </span><span style="font-size: 12pt">代表滑雪场的地点的数量。接下来的</span><i><span style="font-size: 12pt">n</span></i><span style="font-size: 12pt">行，描述</span><span style="font-size: 12pt">1~<i>n</i></span><span style="font-size: 12pt">号地点出发的斜坡，第</span><i><span style="font-size: 12pt">i</span></i><span style="font-size: 12pt">行的第一个数为</span><i><span style="font-size: 12pt">m<sub>i</sub></span></i><span style="font-size: 12pt"> (0 &lt;= <i>m<sub>i</sub></i> &lt; <i>n</i>) </span><span style="font-size: 12pt">，后面共有</span><i><span style="font-size: 12pt">m<sub>i</sub></span></i><span style="font-size: 12pt">个整数，由空格隔开，每个整数</span><i><span style="font-size: 12pt">a<sub>ij</sub></span></i><span style="font-size: 12pt">互不相同，代表从地点</span><i><span style="font-size: 12pt">i</span></i><span style="font-size: 12pt">下降到地点</span><i><span style="font-size: 12pt">a<sub>ij</sub></span></i><span style="font-size: 12pt">的斜坡。每个地点至少有一个斜坡与之相连。</span></div></div><h2>Output</h2><div class=content><div style="margin: 13pt 0cm; line-height: normal">&nbsp;</div>
<div><span style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-size: 12pt">输出文件的第一行是一个整数</span><i><span style="font-size: 12pt">k</span></i><span style="font-size: 12pt"> &ndash; </span><span style="font-size: 12pt">直升飞机的最少飞行次数。</span></div>
<div style="text-indent: 21pt">
<div style="margin: 13pt 0cm; line-height: normal"></div>
</div></div><h2>Sample Input</h2>
			<div class=content><span class=sampledata>8<br />
1 3<br />
1 7<br />
2 4 5<br />
1 8<br />
1 8<br />
0<br />
2 6 5<br />
0<br />
</span></div><h2>Sample Output</h2>
			<div class=content><span class=sampledata>4</span></div><h2>HINT</h2>
			<div class=content><p></p></div><h2>Source</h2>
			<div class=content><p><a href='problemset.html?search=2011福建集训'>2011福建集训</a></p></div><center>[<a href='submitpage.php?id=2502'>Submit</a>][<a href='problemstatus.php?id=2502'>Status</a>][<a href='bbs.php?id=2502'>Discuss</a>]</center>﻿<br>

<a href="./"><span class=red>HOME</span></a>
<a href="javascript:history.go(-1)"><span class=red>Back</span></a>

<hr>
<center>
	<div class="footer">
			<a href=setlang.php?lang=ko>한국어</a>&nbsp;
		<a href=setlang.php?lang=cn>中文</a>&nbsp;
		<a href=setlang.php?lang=fa>فارسی</a>&nbsp;
		<a href=setlang.php?lang=en>English</a>&nbsp;
		<a href=setlang.php?lang=th>ไทย</a>
	<br>		<div>版权所有 &copy;2008-2012 WaterPark Organization. | <script src="http://s21.cnzz.com/stat.php?id=2982771&web_id=2982771" language="JavaScript"></script>
</div>
		<div>Based on opensource project <a href="http://hustoj.googlecode.com">hustoj</a>.</div>
	</div>
</center>
</body>
</html>
